bitmask: Don't hardcode 64bit size
authorDmitry Shachnev <mitya57@ubuntu.com>
Sun, 27 Sep 2015 13:10:15 +0000 (15:10 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 27 Sep 2015 13:12:22 +0000 (15:12 +0200)
This looks like an oversight from "quickly testing a potential fix" and
then forgetting to make a production-ready when it works.

https://bugzilla.gnome.org/show_bug.cgi?id=755691

gtk/gtkallocatedbitmask.c

index f95e312ae914e54cc6b739014147b6070df01e8d..f655e9d6a13d10db7bbf816f46ceb2e971b9dd89 100644 (file)
@@ -312,7 +312,7 @@ _gtk_allocated_bitmask_invert_range (GtkBitmask *mask,
   for (i = start_word; i <= end_word; i++)
     mask->data[i] ^= ALL_BITS;
   mask->data[start_word] ^= (((VALUE_TYPE) 1) << start_bit) - 1;
-  if (end_bit != 63)
+  if (end_bit != VALUE_SIZE_BITS - 1)
     mask->data[end_word] ^= ALL_BITS << (end_bit + 1);
 
   return gtk_allocated_bitmask_shrink (mask);